$(function () {
    vm.title = "静态资源国际化"
});

var vm = new Vue({
    el:'#rrapp',
    data:{
        title: null,
        showList: false,
        propCodeGenerator: {languageTypeList : []},
        languageTypeList: [
            {"value" : "zh_CN","label" : "zh_CN"},
            {"value" : "zh_HK","label" : "zh_HK"},
            {"value" : "en_US","label" : "en_US"}
        ],
        typeList : [
            {"value": "JavaProperties","label" : "javaProperties文件"},
            {"value": "VUE", "label": "VUE资源文件"}
        ],
        translateTypeList: [
            {"value" : "DEFAULT", "label" : "默认(中文，其他不翻译)"},
            {"value" : "YeeCloudMt", "label" : "收费(较便宜)"},
            {"value" : "ErAi", "label" : "收费(较贵)"},
        ]
    },
    methods: {
        save: function (event) {
            var url = "code/generator/languageDataGenerator";
            $.ajax({
                type: "POST",
                url: baseURL + url,
                contentType: "application/json",
                data: JSON.stringify(vm.propCodeGenerator),
                success: function(r){
                    if(r.code === 0){
                        alert('操作成功', function(index){
                            // vm.reload();
                        });
                    }else{
                        alert(r.msg);
                    }
                }
            });
        }
    }
});